Re: Multilingual database - Mailing list pgsql-novice

From M. Bastin
Subject Re: Multilingual database
Date
Msg-id a05210607bae7083d5a57@[213.119.70.233]
Whole thread Raw
In response to Re: Multilingual database  (Terence Ng <ngterry2000@yahoo.com.hk>)
Responses Re: Multilingual database
List pgsql-novice
At 11:12 AM +0800 5/13/03, Terence Ng wrote:
>I see. Thank you very much.  But I have come up
>another question.  For the language-dependent
>information, there is a code to differentiate each
>record, and every column has the same language.


No!  One single column contains all descriptions, regardless of their language!
If you'd have a column per language, then you'd get into the same
kind of problems as when you'd have a table per language.

Example:

CODE    LANGUAGE    DESCRIPTION
x123    French        frites surgeles
x123    English        frozen french fries
z456    French        gaufres belges
z456    English        belgian waffles

>  What
>if I expand my web site, allowing customers from
>different countries lookup their orders.  How do I
>record their information if I allow them to register
>their info in their languages?  For example, I will
>have customer_id and customer_name.  How do I record
>customer_name?  Is it a good practice if I create
>every language a column, with customer_id as a
>relation?

Your customer data is probably not language dependent.  One table
should be enough.

Example:

ID    LAST NAME    FIRST NAME    GENDER    LANGUAGE    ADDRESS
101    Dupont        Louis        m    French        ... France
102    Jones        Tina        f    English        ... USA

The way you present this information on screen should be in the
customer's language, but each bit of customer information you
actually want to store, is unique per customer, and the language is
not relevant: a last name is just always a last name, whether the
person speaks French or English.

Marc


pgsql-novice by date:

Previous
From: Josh Berkus
Date:
Subject: Re: can't alter user with the postgres user
Next
From: Katy Earl
Date:
Subject: Re: can't alter user with the postgres user